package Aop.Object;

import Aop.AopOption;
import android.graphics.Bitmap;
import android.graphics.Matrix;

public class BitmapObject
{
	public Bitmap image[];
	byte number;
	
	public void Create(Bitmap _image, int _number)
	{
		number = (byte)_number;
		image = new Bitmap[number];
		float sizeX = (float)_image.getWidth() / (float)number;
		Matrix matrix = new Matrix();
		matrix.postScale((float)AopOption.scaleRatioX, (float)AopOption.scaleRatioY);
		for(byte roll = 0; roll < number; roll++)
		{
			image[roll] = Bitmap.createBitmap(_image, (int)(roll * sizeX), 0, (int)sizeX, _image.getHeight(), matrix, false);
		}
		_image.recycle();
	}
	
	public void Release()
	{
		for(byte roll = 0; roll < number; roll++)
			image[roll].recycle();
		number = 0;
	}
}
